import requests

BASE_URL = "http://127.0.0.1:5000/predict"

def test_predict(text, task="all"):
    response = requests.post(BASE_URL, json={"text": text, "task": task})
    return response.json()

if __name__ == "__main__":
    text = "屏幕显示很给力，系统优化也不错，很流畅..."
    print("综合预测:", test_predict(text, task="all"))
